	<?php echo $this->Session->flash('rl'); ?>
<span>Added References</span>
		<table cellpadding="0" cellspacing="0">
			<tr><th>Reference Name:</th><th>Contact Phone:</th><th>Email Address:</th><th>Reference Received:</th><th>Delete Reference:</th></tr>
		<?php
		
		foreach ($data as $line => $ref) {
			echo (($line+1)%2==1)? '<tr class="odd">': '<tr class="even">';
			echo "\n<td>{$ref['Reference']['firstname']} {$ref['Reference']['lastname']}</td>";
			echo "\n<td>{$ref['Reference']['phone']}</td>";
			echo "\n<td>{$ref['Reference']['email']}</td>";
			echo "\n<td>";
			echo ($ref['Reference']['complete'])? 'Yes':'No';
			echo '</td>';
			echo "\n<td>";
			if (!$ref['Reference']['complete']) {
				echo $this->Js->link('delete', 
						array('controller' => 'References', 'action' => 'delete',  $ref['Reference']['id']), 
						array('update' => '#ref_list'), null, 'Are you sure you want do delete this reference?');
			} else {
				echo '&nbsp;';
			}
			echo "</td>";
			echo '</tr>';
		}
		?>
	</table>